<div class="panel" ng-controller="mainCargaCtrl">
    <div class="panel-heading">
        <div class="form-group form-inline">
            <strong>Proyecto:</strong>
            <span class="ui-select">
                        <select ng-model="proyecto" ng-change= listaTextos(proyecto.id) ng-options="proyecto.nombre_proyecto for proyecto in proyectos">
                            <option></option>
                        </select>
                    </span>
        </div>
    </div>
    <div class="panel-body" ng-show="proyecto">    
        <table class="table table-striped table-responsive table-dynamic">
            <thead>
                <tr>
                    <th><div class="th">
                        N°
                    </div></th>
                    <th><div class="th">
                        Puntos
                    </div></th>
                    <th><div class="th">
                        Titular
                    </div></th>
                    <th><div class="th">
                        Acción
                    </div></th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="text in textos">
                    <td>{{$index+1}}</td>
                    <td>{{text.puntos}}</td>
                    <td>{{text.titular}}</td>
                    <td class="text-center">
                        <a href="" class="btn-icon-lined btn-icon-sm btn-icon-round btn-success"><span class="glyphicon glyphicon-ok" ng-click=incluir(text.id,proyecto.id)></span></a>  
                        <a href="" class="btn-icon-lined btn-icon-sm btn-icon-round btn-danger"><span class="glyphicon glyphicon-remove" ng-click="textos.splice($index, 1)"></span></a></td>
                </tr>
            </tbody>
        </table>
        <a href="#/carga/nuevo" class="btn"><span class="glyphicon glyphicon-plus"></span> Añadir</a>
        <!--footer class="table-footer">
            <div class="row">
                <div class="col-md-6">
                    <span>
                        Ver 
                        <select data-ng-model="numPerPage"
                                data-ng-options="num for num in numPerPageOpt"
                                data-ng-change="onNumPerPageChange()">
                        </select> 
                    </span>
                </div>
                <div class="col-md-6 text-right pagination-container">
                    <pagination class="pagination-sm"
                                ng-model="currentPage"
                                total-items="filteredStores.length"
                                max-size="4"
                                ng-change="select(currentPage)"
                                items-per-page="numPerPage"
                                rotate="false"
                                previous-text="&lsaquo;" next-text="&rsaquo;"
                                boundary-links="true"></pagination>
                </div>
            </div>
        </footer-->
    </div>
    <!--div class="panel-body" ng-show="etiquetado">
        <div class="panel-heading"><strong>titular:</strong><p>{{titular}}</p></div>
            <span class="ui-select">
                <select tooltip-placement="right" tooltip="Seleccion de valor" tooltip-append-to-body="true">
                  <option></option>
                </select>
            </span>
        <div class="divider divider-ls pull-in"></div>
        <form class="form-group form-inline">
            <button class="btn btn-default"><span class="glyphicon glyphicon-chevron-left"> Anterior</span></button>
            <button class="btn btn-default">Siguiente <span class="glyphicon glyphicon-chevron-right"></span></button>
        </form>
        <div class="divider divider-ls pull-in"></div>
        <form class="form-group form-horizontal">
            <div class="panel-heading"><strong>observación</strong></div>
            <div class="row col-md-4">
                <textarea class="form-control"></textarea>                
            </div>
        </form>
    </div-->
</div>